package com.crm.service.impl;

import com.crm.entity.CrmActivityRemark;
import com.crm.entity.CrmUser;
import com.crm.mapper.CrmActivityRemarkMapper;
import com.crm.service.ICrmActivityRemarkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crm.vo.ActivityRemark;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author junxian, dou
 * @since 2024-11-25
 */
@Service
public class CrmActivityRemarkServiceImpl extends ServiceImpl<CrmActivityRemarkMapper, CrmActivityRemark> implements ICrmActivityRemarkService {

    @Override
    public void saveCreateActivityRemark(ActivityRemark remark) {
        CrmActivityRemark crmActivityRemark = remark.createCrmActivityRemark();
        save(crmActivityRemark);
    }

    @Override
    public void updateCreateActivityRemark(ActivityRemark remark) {
        CrmActivityRemark crmActivityRemark = new CrmActivityRemark();
        crmActivityRemark.setId(remark.getId());
        crmActivityRemark.setNoteContent(remark.getNoteContent());
        crmActivityRemark.setActivityId(remark.getActivityId());
        updateById(crmActivityRemark);
    }
}
